<template>
	<view class="">
		<view class="combodys">
			<view class="head flex-row">
				<view class="headtetx ischoose" style="">
					{{ type==1?'日本看病指南':type==2?'抗癌技术':'日本干细胞' }}
					<view class="linebox">
					</view>
				</view>
			</view>
			<view class="con_div justify-between">
				<view v-for="(item,index) in medicalGuide" :key="index" class="back_div" @click="toNewsList(item)">
					{{item.dictLabel}}</view>
			</view>
		</view>
	</view>

</template>

<script>
	import {
		getDicts
	} from '@/api/api.js'
	export default {
		props: ['type'],
		data() {
			return {
				medicalGuide: [],
			}
		},
		created() {
			this.getDicts()
		},
		methods: {
			// 获取日本看病类型
			getDicts() {
				let dictstr = ""
				if (this.type == 1) {
					dictstr = "medical_guide"
				} else if (this.type == 2) {
					dictstr = "anticancer_technology"
				} else {
					dictstr = "stem_cells"
				}
				getDicts(dictstr).then(res => {
					this.medicalGuide = res.data
				});
			},
			toNewsList(item) {
				uni.navigateTo({
					url:  '/pages/serve/seeDoctorzn?classify='+this.type+'&typeid='+item.dictValue
				});
			}

		}
	}
</script>

<style lang="scss" scoped>
	.combodys {
		background: #fff;
		border-radius: 32rpx;
		margin-top: 16rpx;

		.head {
			height: 110rpx;
			padding: 10rpx 32rpx 0;
			border-bottom: 1px solid #D7DDDC;

			.headtetx {
				font-size: 40rpx;
				display: flex;
				align-items: center;
				height: 100rpx;
				margin-right: 40rpx;
				position: relative;
				font-weight: bold;

				.linebox {
					position: absolute;
					bottom: 0;
					width: 160rpx;
					height: 10rpx;
					background: #00D9B2;
					border-radius: 50rpx;
				}
			}
		}

		.con_div {
			box-sizing: border-box;
			padding: 32rpx 16rpx 16rpx;
			display: flex;
			flex-wrap: wrap;
			/* 使子元素换行 */

			.back_div {
				width: 343rpx;
				height: 82rpx;
				background: #EDFCF9;
				border-radius: 10px;
				font-weight: bold;
				font-size: 34rpx;
				color: #00977C;
				line-height: 82rpx;
				text-align: center;
				margin-bottom: 16rpx;

			}
		}
	}
</style>